<?php

/**
 * ownCloud – joomla http client 
 *
 * @author pipapai
 * @copyright 2013 pipapai.com
 */

abstract class Http {

   public function get($action, array $headers=null, $timeout=null) {
      $base = getLocalhostURI();
      $httpclient = new JHttp2();

      return $httpclient->get($base . $action, $headers, $timeout); 
   }

   public function post($action, $data, array $headers = null, $async=false) {
      $base = getLocalhostURI();
      $httpclient = new JHttp2();
      return $httpclient->post($base . $action, $data, $headers, $async);
   }

}

